package com.jianyun.jyzs.utils;

import android.content.Intent;
import android.widget.TextView;

import com.jianyun.jyzs.activity.FlowExamineActivity;
import com.jianyun.jyzs.activity.FlowExamineHtmlActivity;
import com.jianyun.jyzs.activity.SelectContact2Activity;
import com.jianyun.jyzs.widget.SelectConfig;


/**
 * Created by liml on 17/5/15.
 * 选择联系人 选择日期
 */

public class WorkFlowActHelper {
    public static final int GETUSER = 99;

    /*
	 * 显示date
	 */
    public static void showDate(final FlowExamineActivity act) {
        DateDialogUtil dialog = new DateDialogUtil(act, act.searchPopWindow.searchTime);
        dialog.onCreateDialog().show();
    }

    public static void showDate2(final FlowExamineHtmlActivity act) {
        DateDialogUtil dialog = new DateDialogUtil(act, act.searchPopWindow.searchTime);
        dialog.onCreateDialog().show();
    }

    public static void showPp2(FlowExamineHtmlActivity act,TextView et) {
        act.textViewTemp = et;
        Intent intent = new Intent(act,SelectContact2Activity.class);
        SelectConfig selectConfig = new SelectConfig();
        selectConfig.setMaxSelectedNumber(2);
        intent.putExtra(Const.SELECT_CONFIG, selectConfig);
        act.startActivityForResult(intent, GETUSER);
    }

    public static void showPp(FlowExamineActivity act,TextView et) {
        act.textViewTemp = et;
        Intent intent = new Intent(act,SelectContact2Activity.class);
        SelectConfig selectConfig = new SelectConfig();
        selectConfig.setMaxSelectedNumber(2);
        intent.putExtra(Const.SELECT_CONFIG, selectConfig);
        act.startActivityForResult(intent, GETUSER);
    }
}
